package cn.yuanqiao.archive.storeRoom.mapper;

import cn.yuanqiao.archive.appManager.domain.DataScopeBase;
import cn.yuanqiao.archive.storeRoom.domain.SafetyCheck;
import cn.yuanqiao.common.annotation.DataScope;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * SafetyCheckMapper接口
 * 
 * @author xy
 * @date 2023-06-15
 */
@Mapper
public interface SafetyCheckMapper
{
    /**
     * 查询SafetyCheck
     * 
     * @param ID SafetyCheck主键
     * @return SafetyCheck
     */
    public SafetyCheck selectSafetyCheckByID(@Param("id")Long ID, @Param("code") String code);

    /**
     * 查询SafetyCheck列表
     * 
     * @param safetyCheck SafetyCheck
     * @return SafetyCheck集合
     */
    @DataScope(deptAlias = "d", userAlias = "a",deptColumn = "DEPT_ID",userColumn = "CREATOR")
    public List<SafetyCheck> selectSafetyCheckList(@Param("dataScopeBase") DataScopeBase dataScopeBase, @Param("safetyCheck") SafetyCheck safetyCheck, @Param("code") String code);

    /**
     * 新增SafetyCheck
     * 
     * @param safetyCheck SafetyCheck
     * @return 结果
     */
    public int insertSafetyCheck(@Param("safetyCheck") SafetyCheck safetyCheck, @Param("code") String code);

    /**
     * 修改SafetyCheck
     * 
     * @param safetyCheck SafetyCheck
     * @return 结果
     */
    public int updateSafetyCheck(@Param("safetyCheck") SafetyCheck safetyCheck, @Param("code") String code);

    /**
     * 删除SafetyCheck
     * 
     * @param id SafetyCheck主键
     * @return 结果
     */
    public int deleteSafetyCheckById(@Param("id")Long id, @Param("code") String code);

    /**
     * 批量删除SafetyCheck
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteSafetyCheckByIds(@Param("ids")Long[] ids, @Param("code") String code);
}
